#pragma once
#include "istatu.h"
#include "CGraphicMgr.h"
class DateTimeStatu :
	public IStatu
{
public:
	DateTimeStatu(WCHAR* name);
	~DateTimeStatu(void);
	enum{
		YEAR_ACTIVE,
		MONTH_ACTIVE,
		DAY_ACTIVE,
		HOUR_ACTIVE,
		MINU_ACTIVE
	};
	virtual bool EnterStatu();
	virtual bool ExitStatu();
	virtual bool EvaluateClickEvent(const WCHAR* elementName);
	virtual bool EvaluateDBClickEvent(const WCHAR* elementName);
	void InitSysTimeZone(void);
	vector<wstring> m_veZoneTxt;
	int m_nIndexZone;
	TIME_ZONE_INFORMATION m_tziCurrent; 
	TIME_ZONE_INFORMATION m_tziSelected;
	TIME_ZONE_INFORMATION m_tziUpSelected;
	bool TimeZoneUp(void);
	bool TimeZoneDown(void);
	SYSTEMTIME m_timeSelected;
	SYSTEMTIME m_timeCurrent;
	 int m_iActive;
	 CStaticText* m_pYear;
	 CStaticText* m_pMonth;
	 CStaticText* m_pDay;
	 CStaticText* m_pMinute;
	 CStaticText* m_pHour;
	 CTransparentLayer *m_ptransLayer;
	 bool TimeChangedUp(void);
	 bool TimeChangedDown(void);
	 bool IsLeapYear(int nYear);
	 int GetMonthDay(SYSTEMTIME time);
	 BOOL UpdateTimeZone(SYSTEMTIME& pstOld);
	 void UpdataTime(void);
	 void SaveDateTimeChange();
};
